package com.example.musicserver.tools;

import org.apache.commons.codec.digest.DigestUtils;

public class MD5Util {
    //定义⼀个固定的盐值
    private static final String salt = "loveyou";

    public static String md5(String src) {
        return DigestUtils.md5Hex(src + salt);
    }

    public static boolean verify(String password,String dbpassword) {
        return dbpassword.equals(md5((password)));
    }
}
